projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c5c301a
)
e820: fix e820_change_range_type()
author
Keir Fraser
<keir.fraser@citrix.com>
Mon, 9 Nov 2009 20:05:43 +0000
(20:05 +0000)
committer
Keir Fraser
<keir.fraser@citrix.com>
Mon, 9 Nov 2009 20:05:43 +0000
(20:05 +0000)
In below case, e820_change_range_type() will return success:
[s, e] is in the middle of [rs, re] and e820->nr_map+1 >=
ARRAY_SIZE(e820->map) actually, it's failed, so this patch fix it
Signed-off-by: Xiao Guangrong <ericxiao.gr@gmail.com>
xen/arch/x86/e820.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/e820.c
b/xen/arch/x86/e820.c
index 5dfb3f3c41b8990d5e7efe7fc51e58235b177d28..eac051fad8051df44dd7a243ad107926f3a83d7c 100644
(file)
--- a/
xen/arch/x86/e820.c
+++ b/
xen/arch/x86/e820.c
@@
-574,7
+574,7
@@
int __init e820_change_range_type(
e820->map[i+1].type = new_type;
}
}
- else
if ( e820->nr_map+1 < ARRAY_SIZE(e820->map) )
+ else
{
if ( (e820->nr_map + 2) > ARRAY_SIZE(e820->map) )
goto overflow;